#ifndef TEXT_H
#define TEXT_H

#include "SDL.h"
#include "SDL_ttf.h"

extern TTF_Font *font_error, *alphbeta8, *antiqua8, *antiqua16, *antiqua32, 
       *pixChicago8, *pixChicago16, *editundo14, *kyrou8;

/* Before any text can be written, a pencil must be created with the following
 * information: */
typedef struct {
	SDL_Surface* sf;
	TTF_Font* font;
	SDL_Color color;
	SDL_Color shadow;
} Pencil;

void load_fonts();
int writef(Pencil pencil, int x, int y, char* fmt, ...);
SDL_Surface* dbl_text(Pencil pencil, int wrap, char* fmt, ...);
int text_width(Pencil pencil, char* fmt, ...);

#endif
